#define  _CRT_SECURE_NO_WARNINGS 1
int removeDuplicates(int* nums, int numsSize) 
{
	if (numsSize <= 2)
		return numsSize;
	int index = 2;
	int i = 0;
	for (i = 2; i < numsSize; i++)
	{
		if (nums[i] != nums[index-2])
		{
			nums[index++] = nums[i];
		}
	}
	return index;
}
int main()
{
	int nums[] = { 0,0,1,1,1,1,2,3,3 };
	removeDuplicates(nums, 9);
	return 0;
}